package com.itfreer.data.check;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.data.check.dao.CheckConfigTypeDao;
import com.itfreer.data.check.entity.CheckConfigTypeEntity;
import com.itfreer.form.api.BaseDao;
import com.itfreer.form.api.DictionaryServiceImp;
import com.itfreer.form.api.dictionary.DictionaryEntity;

/**
 * 定义检测类型表
 */
@Component
public class CheckConfigTypeServiceBase extends DictionaryServiceImp<CheckConfigTypeEntity> implements CheckConfigTypeService {

	@Autowired
	private CheckConfigTypeDao workingGroupDao;

	@Override
	public String getDictionaryName() {
		return "d_check_type";
	}
	
	@Override
	public String getServiceName() {
		return "CheckConfigTypeService";
	}

	@Override
	protected DictionaryEntity convert(CheckConfigTypeEntity entity) {
		DictionaryEntity toEntity = new DictionaryEntity();
		BeanUtils.copyProperties(entity, toEntity);
		return toEntity;
	}

	@Override
	protected String getDictionaryFields() {
		return "*";
	}

	@Override
	protected BaseDao<CheckConfigTypeEntity> getDao() {
		return workingGroupDao;
	}
}
